From db263bc2d6ef1d0490f859d70cf03887fed7d639 Mon Sep 17 00:00:00 2001 From: justbur Date: Sat, 19 Sep 2015 11:10:58 -0400 Subject: [PATCH] Better messages for add-key-val-to-alist --- which-key.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/which-key.el b/which-key.el index 028a99629aa..4bd59f572e6 100644 --- a/which-key.el +++ b/which-key.el @@ -497,12 +497,13 @@ bottom." (defun which-key--add-key-val-to-alist (alist key value) "Internal function to add (KEY . VALUE) to ALIST." (when (or (not (stringp key)) (not (stringp value))) - (error "KEY and VALUE should be strings")) + (error "which-key: Error %s (key) and %s (value) should be strings" + key value)) (let ((key-lst (listify-key-sequence (kbd key)))) (cond ((null alist) (list (cons key-lst value))) ((assoc key-lst alist) - (message "which-key: changing %s name from %s to %s" - key (cdr (assoc key-lst alist)) value) + (message "which-key: changing %s name from %s to %s in %s" + key (cdr (assoc key-lst alist)) value alist) (setcdr (assoc key-lst alist) value) alist) (t (cons (cons key-lst value) alist))))) -- 2.30.2